package com.crm.model.vo.activityManager;

import com.crm.model.entity.activityManager.CustomerProductActivity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * 添加合同-显示有效的产品活动对象
 * @author luojie
 * @date 2021/3/19 14:26
 */
@Data
public class CustomerContractProductActivityVO {
    //产品活动ID
    private String productActivityId;

    //活动名称
    private String productActivityName;

    //活动有效期开始日期
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date activityPeriodValidityStart;

    //活动有效期结束日期
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date activityPeriodValidityEnd;

    //上下架状态--1:上架;2:下架
    private String activityShelfStatus;

    //活动价格
    private BigDecimal activityPrice;

    //兑换方式
    private String exchangeMethod;

    //创建人ID
    private String createPeopleId;

    //创建时间
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    private Date createTm;

    //活动下产品列表
    private List<HashMap> productList;

    //判断是否是会员活动
    private Boolean ifMemberActivity;


    public CustomerContractProductActivityVO(CustomerProductActivity customerProductActivity){
        this.productActivityId = customerProductActivity.getProductActivityId();
        this.productActivityName = customerProductActivity.getProductActivityName();
        this.activityPeriodValidityStart = customerProductActivity.getActivityPeriodValidityStart();
        this.activityPeriodValidityEnd = customerProductActivity.getActivityPeriodValidityEnd();
        this.activityShelfStatus = customerProductActivity.getActivityShelfStatus();
        this.activityPrice = customerProductActivity.getActivityPrice();
        this.exchangeMethod = customerProductActivity.getExchangeMethod();
        this.createPeopleId = customerProductActivity.getCreatePeopleId();
        this.createTm = customerProductActivity.getCreateTm();
        //查询活动下产品

    }
}
